﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="BackendUC.ascx.cs" Inherits="PASNew.UserControls.BackendUC" %>

<h1>
    BACKEND</h1>
<h3>
    COMPANY
</h3>
<asp:ScriptManager ID="smBackend" runat="server">
</asp:ScriptManager>
<asp:UpdatePanel ID="upBackend" runat="server">
    <ContentTemplate>
        <div class="clientnavi">
            <div class="left">
                <ul>
                    <li>
                        <asp:Button ID="btnNewCompany" runat="server" Text="New" CssClass="button" 
                            ToolTip="Click here to add a new company" onclick="btnNewCompany_Click" CausesValidation="false"></asp:Button>
                    </li>
                    <li>
                        <asp:Button ID="btnSaveCompany" runat="server" Text="Save" CssClass="button" 
                            ToolTip="Click here to save company" onclick="btnSaveCompany_Click" CausesValidation="false"></asp:Button>
                    </li>
                    <li>
                        <asp:Button ID="btnDelete" runat="server" Text="Delete" CssClass="button" 
                            ToolTip="Click here to delete company" onclick="btnDelete_Click" CausesValidation="false"></asp:Button>
                    </li>
                </ul>
            </div>
            <div class="right" style="padding-top: 5px;">
                <asp:TextBox ID="tbCompanyName" runat="server" CssClass="textbox" Visible="False"></asp:TextBox>
                <asp:DropDownList ID="DDLoadCompanies" runat="server" Style="height: 22px" OnSelectedIndexChanged="DDLoadCompanies_SelectedIndexChanged"
                    AutoPostBack="True" AppendDataBoundItems="true" CssClass="dropdown">
                    <asp:ListItem Text="Please select company ---" Value="-1"></asp:ListItem>
                </asp:DropDownList>
            </div>
            <div class="clear">
            </div>
        </div>
        <h3>
            USERS</h3>
        <div class="clientnavi">
            <div class="left">
                <ul>
                    <li>
                         <asp:Button ID="btnNewUser" runat="server" Text="New" CssClass="button" 
                            ToolTip="Click here to add a new user" onclick="btnNewUser_Click" CausesValidation="false"></asp:Button>
            </li>
            <li>
                <asp:Button ID="btnSaveUser" runat="server" Text="Save" CssClass="button" 
                            ToolTip="Click here to add a save user" 
                    onclick="btnSaveUser_Click"></asp:Button>
            </li>
            <li>
                 <asp:Button ID="btnDeleteUser" runat="server" Text="Delete" CssClass="button" 
                            ToolTip="Click here to add a delete user" onclick="btnDeleteUser_Click" 
                   ></asp:Button>
            </li>
        </ul>
    </div>
    <div class="right" style="padding-top: 5px;">
        <asp:Label ID="lblNumber" runat="server" Text="Users: " AssociatedControlID="DDLoadCompanies"></asp:Label>
        <asp:DropDownList ID="DDLoadNames" runat="server" Style="height: 22px" AppendDataBoundItems="true" AutoPostBack="True"
            CssClass="dropdown" OnSelectedIndexChanged="DDLoadNames_SelectedIndexChanged">
            <asp:ListItem Text="Please select user ---" Value="-1"></asp:ListItem>
        </asp:DropDownList>
    </div>
    <div class="clear">
    </div>
</div>
<div class="clientdetail">
    <div class="left">
        <p>
            <asp:Label ID="lblUserName" runat="server" Text="User Name" AssociatedControlID="txtBoxUserName"></asp:Label><br />
            <asp:TextBox ID="txtBoxUserName" runat="server" CssClass="textbox"></asp:TextBox><asp:RequiredFieldValidator
                runat="server" ID="UserNameCheck" ErrorMessage="Please input users name" ControlToValidate="txtBoxUserName"
                ForeColor="White"></asp:RequiredFieldValidator><br />
        </p>
        <p>
            <asp:Label ID="lblUserEmail" runat="server" Text="User Email" AssociatedControlID="txtBoxUserEmail"></asp:Label><br />
            <asp:TextBox ID="txtBoxUserEmail" runat="server" CssClass="textbox"></asp:TextBox>
            <asp:RegularExpressionValidator ID="emailFormatCheck" runat="server" ErrorMessage="Please input a valid email"
                ForeColor="Black" ControlToValidate="txtBoxUserEmail" Width="180px" Display="Dynamic"></asp:RegularExpressionValidator>
            <asp:RequiredFieldValidator runat="server" ID="UserEmailCheck" ErrorMessage="Please input users email"
                ControlToValidate="txtBoxUserEmail" ForeColor="Black" Display="Dynamic"></asp:RequiredFieldValidator>
        </p>
        <p>
            <asp:Label ID="lblPassword" runat="server" Text="Password" AssociatedControlID="txtBoxPassword"></asp:Label><br />
            <asp:TextBox ID="txtBoxPassword" runat="server" CssClass="textbox"></asp:TextBox>
            <asp:RequiredFieldValidator runat="server" ID="UserPassowrdCheck" ErrorMessage="Please input users password"
                ControlToValidate="txtBoxPassword" ForeColor="Black" Display="Dynamic"></asp:RequiredFieldValidator><br />
        </p>
        <p>
            <asp:Label ID="lblALevel" runat="server" Text="Access Level"></asp:Label><br />
            <asp:TextBox ID="txtBoxUserALevel" runat="server" CssClass="textbox"></asp:TextBox><asp:RangeValidator
                ID="RVALevel" runat="server" ErrorMessage="Select 3(Manager) or 4(Sales Person)"
                ControlToValidate="txtBoxUserALevel" ForeColor="Black" MaximumValue="4" MinimumValue="1"
                Display="Dynamic"></asp:RangeValidator>
        </p>
        <asp:Label ID="lblSuccess" runat="server" Text="Label" Visible="False" ForeColor="White"></asp:Label><br />
    </div>
    <div class="clear">
    </div>
</div>
</ContentTemplate>
</asp:UpdatePanel>